<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>时间函数</title>
	<!--百度jQueryCDN-->
	<script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
	<script>
		$(document).ready(function() {
			//mousedown
			$("div").mousedown(function() {
				$(this).css('background-color', 'blue');
			});

			//mouseup
			$("div").mouseup(function() {
				$(this).css('background-color', 'green');
			});

			//hover
			$("div").hover(function() {
				$(this).text("mouseover");
			}, function() {
				$(this).text("mouseout");
			});

			//blur
			$("input").blur(function() {
				$(this).css('border', '5px solid orange');
			});

			//focus
			$("input").focus(function() {
				$(this).css("border","5px solid black");
			});

			//submit
			$("form").submit(function() {
				alert("submit");
			});

			//keypress
			$("body").keypress(function() {
				alert("keypress");
			});
		});
	</script>
	<style>
		* {
			margin: 0;
			padding: 0;
		}
		div {
			width: 100%;
			height:150px;
			background-color: red;
		}
	</style>
</head>
<body>
	<div>
		
	</div>
	<form action="">
		<input type="text" name="" id="">
		<input type="submit" value="提交">
	</form>
</body>
</html>